<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件的基本使用</title>
    <script vue="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id = "root">
       <h2>欢迎来到{{name}}学习</h2>
       <button @click="showinfo1">点我提示信息1(不传参)</button>
       <button @click="showinfo12($event,66)">点我提示信息2(不传参)</button>
    </div>
</body>
   <script type="text/javascript">
    Vue.config.productionTip = false //阻止 vue 在启动时生成生产提示。

      const vm = new Vue({
        el:'#root',
        data:{
            name:'尚硅谷',
        },
        methods:{
          showinfo1(event){
            alert("大家好")
          },
          showinfo12(event,number){
            console.log(event,number)
            alert('同学们好')
          }
        }
      })

      console.log(vm)
   </script>
</html>